home *** CD-ROM | disk | FTP | other *** search
- Path: news.ruhr-uni-bochum.de!usenet
- From: Karsten Soete <Karsten.Soete@rz.ruhr-uni-bochum.de>
- Newsgroups: comp.lang.c++
- Subject: Re: linker error Borland C++ 4.0 for windows
- Date: 21 Apr 1996 16:33:49 GMT
- Organization: Ruhr-Universitaet Bochum, Rechenzentrum
- Message-ID: <4ldo1d$6e7@sun168.rz.ruhr-uni-bochum.de>
- NNTP-Posting-Host: dialslip-31.rz.ruhr-uni-bochum.de
-
- timmo@compute.tfh-berlin.de (Timmo Koehler (s600186)) schreibt:
- > Everytime linking a program we get the following errors:
- >
- > C
- > 1. linker warning: no module definition file specified: using defaults
- > 2. linker error: undefined symbol OwlMain(int,char far*far*) in
- > library file owlwi.lib in module WINMAIN
- >
- >
- >
- > Anyone knows help ?! Thanx in advance !
- >
-
- Your first question:
- The module-definition file ended by .DEF describes the basic
- properties of your application. You must provide your project
- with one to prevent the warning. An example is placed in the
- lib-directory of BC ++.
-
- Your second question:
- Like in normal C(++)-programs the main-function or in standard-
- windows-programs the WINMAIN-function, the OwlMain is the
- entrance-location for your application. Because the OWL bases on
- Windows anywhere in your program must be a call to WINMAIN.
- But WINMAIN will be linked to your application automatically
- by the OWLxx.LIB. WINMAIN then makes a call to OwlMain, which
- you have to implement for your own.
-
- Here the code for a short "Hello World":
- It's some kind of minimal code, for a working app.
- #include <owl\applicat.h>
- #include <owl\framewin.h>
-
- class TMApp:public TApplication{
- public:
- TMApp(const char *name=0):TApplication(name){}
-
- void InitMainWindow();
- };
-
- void TMApp::InitMainWindow(){
- SetMainWindow(new TFrameWindow(0,"Hello World!"));
- }
-
- int OwlMain(int,char *[]){
- return TMApp().Run();
- }
-
- where TMApp is the name of your application-class derived from
- TApplication.
-
- The module-definition-file should look at follows:
- EXETYPE WINDOWS
-
- CODE MOVEABLE
- DATA MOVEABLE MULTIPLE
-
- STACKSIZE 8192
- HEAPSIZE 4096
-
-